{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "368897dd",
   "metadata": {},
   "outputs": [],
   "source": [
    "a = {'aa':1,'bb':2,'cc':3}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "516b5695",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'aa': 1, 'bb': 2, 'cc': 3}"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1ecbb54b",
   "metadata": {},
   "outputs": [],
   "source": [
    "b = dict([('dd',1),('ee',2)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "513ab499",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'dd': 1, 'ee': 2}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "2e244670",
   "metadata": {},
   "outputs": [],
   "source": [
    "c = dict((('ff',1),('gg',2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "4f1b91a9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "47edb1d4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c['ff']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "abb08b39",
   "metadata": {},
   "outputs": [],
   "source": [
    "d = c.get('h','asb')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "88862ef5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'asb'"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "7a81b894",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2}"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "58da5aa2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2}"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "3e458587",
   "metadata": {},
   "outputs": [],
   "source": [
    "c['20'] = 20"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "2519a193",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2, '20': 20}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "b438651b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.pop('20')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "eb0e7a38",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2}"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "f047dc37",
   "metadata": {},
   "outputs": [],
   "source": [
    "c['1'] = 10"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "83b5765d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2, '1': 10}"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "6ab43066",
   "metadata": {},
   "outputs": [],
   "source": [
    "c['1'] = 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "526b8b8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ff': 1, 'gg': 2, '1': 1}"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "11e003f0",
   "metadata": {},
   "outputs": [],
   "source": [
    "a1 = {'asd':1, 'c':'asd', 'd':{'dd':1}, 'e':(1,2,3), 'f':[1,2,3]}\n",
    "a1['d'] = 100\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "3b4ad1b8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'asd': 1, 'c': 'asd', 'd': 100, 'e': (1, 2, 3), 'f': [1, 2, 3]}"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "26b55bcd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'b': 2}\n"
     ]
    }
   ],
   "source": [
    "b = dict([('a',1), ('b',2)])\n",
    "b.pop('a')\n",
    "print(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "047d6031",
   "metadata": {},
   "outputs": [],
   "source": [
    "f = dict((('a',1),('b',2)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "ba861933",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'a': 1, 'b': 2}"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e5bea8dd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
